package com.sky;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;
import java.util.UUID;

@SpringBootApplication
@EnableTransactionManagement //开启注解方式的事务管理
@Slf4j
@EnableCaching
public class SkyApplication {
    public static void main(String[] args) {
        SpringApplication.run(SkyApplication.class, args);
        log.info("server started");
        /*String salt = UUID.randomUUID().toString().replace("-", " ");

        String str = DigestUtils.md5DigestAsHex(("123456" + salt).getBytes());
        System.out.println("str:"+str); //dc30caa5788c0f078d30a903b6970fce
        System.out.println("salt:"+salt);  //3f06a4d6 7549 492c b76c 2ccd6436bf60*/
    }
}
